import { defineStore } from 'pinia'
import { USER_INFO } from '../utils/constant.js'

export const useUserStore = defineStore('user', {
	state: () => {
		return {
			userInfo: uni.getStorageSync(USER_INFO),
			phone: ''
		}
	},
	actions: {
		setUserInfo (userInfo) {
			this.userInfo = userInfo
		},
		setPhone (phone) {
			this.phone = phone
		}
	}
})